<!DOCTYPE html>
<html xmlns="">
<head>
    <meta charset="UTF-8">
    <title>${serverName}-修改硬件配置</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
    <link rel="stylesheet" href="${hostUrl}/static/layui/css/layui.css">
    <script type="text/javascript" src="${hostUrl}/static/layui/layui.js"></script>
    <script>
        layui.use('form', function(){
            var form = layui.form;

            //监听提交
            form.on('submit(formDemo)', function(data){
                var $ = layui.$;
                $.ajax({
                    type: 'post',
                    data: $('#hsForm').serialize(),
                    url: '${hostUrl}/device/requireUpdateHardwareSet',
                    cache:false,
                    dataType:'json',
                    success: function (resp) {
                        layer.msg(resp.msg);
                    }
                })
                // 返回false，则不跳转页面
                return false;
            });

        });
    </script>
</head>

<body >
<!-- 强行添加两行，避免Form太过靠上了 -->
<br/><br/>

<form class="layui-form" id="hsForm">

    <input type="hidden" name="devId" value="${hs.deviceId}">
    <div class="layui-form-item">
        <label class="layui-form-label">设备名</label>
        <div class="layui-input-inline ">
            <input type="text" name="devName" required  class="layui-input " value="${hs.deviceName}" >
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">内网IP</label>
        <div class="layui-input-inline ">
            <input type="text" required  class="layui-input " value="${hs.ip}" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">子网掩码</label>
        <div class="layui-input-inline ">
            <input type="text" class="layui-input " value="${hs.netMask}" disabled>
        </div>
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">内网网关</label>
        <div class="layui-input-inline ">
            <input type="text" class="layui-input " value="${hs.gateWay}" disabled>
        </div>
    </div>

    <#if hs.mac != "0-0-0-0-0-0">
    <div class="layui-form-item">
        <label class="layui-form-label">mac地址</label>
        <div class="layui-input-inline ">
            <input type="text" class="layui-input " value="${hs.mac}" disabled>
        </div>
    </div>
    </#if>

    <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit lay-filter="formDemo">确认修改</button>
        </div>
    </div>



</form>
</body>
</html>